import sys

sys.path.append("../lib")
from inner_util import prepare_dir, try_file_path

import pandas as pd




def main():
    file_path = sys.argv[1]
    df = pd.read_excel(file_path)

    col_name = '增加值占比（%）'

    valid_df = df[df[col_name] != '-']
    print("vdf", valid_df[col_name])

    s_df = valid_df.sort_values(col_name, ascending=False)
    print("sdf", s_df)

   
    s_df.to_excel(try_file_path("2024年工业占比.xlsx"))

    pass


if __name__ == "__main__":
    main()
